{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/Users/fripside/PycharmProjects/learn-recommender-system/data/ex1data1.txt\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Population</th>\n",
       "      <th>Profit</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6.1101</td>\n",
       "      <td>17.5920</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5.5277</td>\n",
       "      <td>9.1302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8.5186</td>\n",
       "      <td>13.6620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7.0032</td>\n",
       "      <td>11.8540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5.8598</td>\n",
       "      <td>6.8233</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Population   Profit\n",
       "0      6.1101  17.5920\n",
       "1      5.5277   9.1302\n",
       "2      8.5186  13.6620\n",
       "3      7.0032  11.8540\n",
       "4      5.8598   6.8233"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "%matplotlib inline  \n",
    "\n",
    "import os\n",
    "path = os.getcwd() + '/data/ex1data1.txt'\n",
    "print(path)\n",
    "data = pd.read_csv(path, header=None, names=['Population', 'Profit'])\n",
    "data.head()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Population</th>\n",
       "      <th>Profit</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>97.000000</td>\n",
       "      <td>97.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>8.159800</td>\n",
       "      <td>5.839135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>3.869884</td>\n",
       "      <td>5.510262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>5.026900</td>\n",
       "      <td>-2.680700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>5.707700</td>\n",
       "      <td>1.986900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>6.589400</td>\n",
       "      <td>4.562300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>8.578100</td>\n",
       "      <td>7.046700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>22.203000</td>\n",
       "      <td>24.147000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Population     Profit\n",
       "count   97.000000  97.000000\n",
       "mean     8.159800   5.839135\n",
       "std      3.869884   5.510262\n",
       "min      5.026900  -2.680700\n",
       "25%      5.707700   1.986900\n",
       "50%      6.589400   4.562300\n",
       "75%      8.578100   7.046700\n",
       "max     22.203000  24.147000"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x10b1ab6d8>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAHuCAYAAABZDVDiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuQpeddH/jvTx4rNBCvLSslCccgJyblArxY8i5hCwd1\nFqbbkNrBU1Nl1oFUL0sY2MoaB9rs4HhXHuxVuQS0cS3U4h2wnQ6koFwRA+NceKfj8hhmd7kZ2Ra+\nYKAkr7lIWMgEG7oibD37xzk9GrV6Zvrt6XP/fKqmdM57br9zeH34nqd/z/NUay0AAMD+3TDpAgAA\nYNYI0QAA0JMQDQAAPQnRAADQkxANAAA9CdEAANDTyEN0VX1BVf16VX2gqj5SVW8eHr+pqraq6uNV\ndb6qnj3qWgAA4DDUONaJrqovbK39VVUdSXIxyWuTHEvyaGvth6vqVJLntNZ+cOTFAADAdRpLO0dr\n7a+GF29M8owkn84gRG8Oj28mecU4agEAgOs1lhBdVTdU1QeSPJLkva21Dye5pbX2yPAujyS5ZRy1\nAADA9ToyjhdprT2R5CVV9V8k6arqH+66vVXV0/pK9joGAACj0Fqr/d53LCF6R2vtP1XVv0vy0iSP\nVNWtrbWHq+q2JH96hceMs0RmwOnTp3P69OlJl8GUcV6wF+cFe3FesJeqfefnJONZnePmnZU3qmop\nydEk9yc5l2RteLe1JL846loAAOAwjGMk+rYkm1V1Qwah/Wdaa++pqvuTvKuqvjPJQ0leOYZaAADg\nuo08RLfWHkhy5x7HH0vyjaN+febP8vLypEtgCjkv2Ivzgr04LzgMY1kn+qCqqk1zfQAAzIeq6jWx\n0LbfAADQkxANAAA9CdEAANCTEA0AAD0J0QAA0JMQDQAAPQnRAADQkxAN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A/p8vO/75vV4TYJEYiQaYvF9N8m3JoN85yadaa5/JIMR+S1X9jap6bpLlDEaw/78kX1FV\nN1bVs5P8t3s857OS/GWSv6iqW5J802W3fWZ4++XasI5XVNVSVX1RklcMj+034AMsDCPRAOO1VyvG\n6STvqKoPZhB81y6774cyaOO4OckbW2sPJ0lVvSvJ7yR5MIN2jae+SGsfHLaNfCzJJzOYxLjjTJJf\nrqo/uqwvOq21+6vqXyb5jeGhnxo+z+171L3flhKAuVSt+R4EmEZV9YYkn22tbUy6FgCeSjsHwHQz\n0gEwhYxEAwBAT0aiAQCgJyEaAAB6EqIBAKAnIRoAAHoSogEAoKf/HxGdc0QrQBqCAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10b19bac8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data.plot(kind='scatter', x='Population', y='Profit', figsize=(12,8))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    Population    Profit\n",
      "0       6.1101  17.59200\n",
      "1       5.5277   9.13020\n",
      "2       8.5186  13.66200\n",
      "3       7.0032  11.85400\n",
      "4       5.8598   6.82330\n",
      "5       8.3829  11.88600\n",
      "6       7.4764   4.34830\n",
      "7       8.5781  12.00000\n",
      "8       6.4862   6.59870\n",
      "9       5.0546   3.81660\n",
      "10      5.7107   3.25220\n",
      "11     14.1640  15.50500\n",
      "12      5.7340   3.15510\n",
      "13      8.4084   7.22580\n",
      "14      5.6407   0.71618\n",
      "15      5.3794   3.51290\n",
      "16      6.3654   5.30480\n",
      "17      5.1301   0.56077\n",
      "18      6.4296   3.65180\n",
      "19      7.0708   5.38930\n",
      "20      6.1891   3.13860\n",
      "21     20.2700  21.76700\n",
      "22      5.4901   4.26300\n",
      "23      6.3261   5.18750\n",
      "24      5.5649   3.08250\n",
      "25     18.9450  22.63800\n",
      "26     12.8280  13.50100\n",
      "27     10.9570   7.04670\n",
      "28     13.1760  14.69200\n",
      "29     22.2030  24.14700\n",
      "..         ...       ...\n",
      "67     10.2360   7.77540\n",
      "68      5.4994   1.01730\n",
      "69     20.3410  20.99200\n",
      "70     10.1360   6.67990\n",
      "71      7.3345   4.02590\n",
      "72      6.0062   1.27840\n",
      "73      7.2259   3.34110\n",
      "74      5.0269  -2.68070\n",
      "75      6.5479   0.29678\n",
      "76      7.5386   3.88450\n",
      "77      5.0365   5.70140\n",
      "78     10.2740   6.75260\n",
      "79      5.1077   2.05760\n",
      "80      5.7292   0.47953\n",
      "81      5.1884   0.20421\n",
      "82      6.3557   0.67861\n",
      "83      9.7687   7.54350\n",
      "84      6.5159   5.34360\n",
      "85      8.5172   4.24150\n",
      "86      9.1802   6.79810\n",
      "87      6.0020   0.92695\n",
      "88      5.5204   0.15200\n",
      "89      5.0594   2.82140\n",
      "90      5.7077   1.84510\n",
      "91      7.6366   4.29590\n",
      "92      5.8707   7.20290\n",
      "93      5.3054   1.98690\n",
      "94      8.2934   0.14454\n",
      "95     13.3940   9.05510\n",
      "96      5.4369   0.61705\n",
      "\n",
      "[97 rows x 2 columns]\n"
     ]
    }
   ],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
